Try to split out flaky and non-flaky tests
authorSimon McVittie <smcv@debian.org>
Fri, 8 May 2020 20:26:01 +0000 (21:26 +0100)
committerSimon McVittie <smcv@debian.org>
Mon, 6 Jul 2020 09:43:40 +0000 (10:43 +0100)
Both sets are marked as flaky for now, but hopefully the less-flaky set
can be promoted to non-flaky to catch regressions when GTK 4 gets more
stable.

debian/tests/control
debian/tests/installed-tests
debian/tests/installed-tests-flaky [new file with mode: 0755]

index 85bb35939b01d7e1ce7d8326709b8257edb054d9..737922d03443994a7de37afd52391ed8a466250e 100644 (file)
@@ -4,9 +4,13 @@ Restrictions: allow-stderr, superficial
 
 Tests: python3-gi
 Depends: dbus, gir1.2-gtk-4.0, python3-gi, xauth, xvfb
-# https://gitlab.gnome.org/GNOME/pygobject/merge_requests/81/diffs
+# https://gitlab.gnome.org/GNOME/pygobject/-/merge_requests/81, !145, etc.
 Restrictions: flaky, superficial
 
 Tests: installed-tests
 Depends: at-spi2-core, dbus (>= 1.8), gnome-desktop-testing (>= 2018.1-1~), gtk-4-examples, locales | locales-all, librsvg2-common, xauth, xvfb
 Restrictions: allow-stderr, flaky
+
+Tests: installed-tests-flaky
+Depends: at-spi2-core, dbus (>= 1.8), gnome-desktop-testing (>= 2018.1-1~), gtk-4-examples, locales | locales-all, librsvg2-common, xauth, xvfb
+Restrictions: allow-stderr, flaky
index 83b57ea25e1450514be06845d9c806094d9e383e..ab00178d0165d1fa3ddf30edfe0eb781038d6743 100755 (executable)
@@ -11,6 +11,13 @@ export GIO_USE_VOLUME_MONITOR=unix
 
 export XDG_RUNTIME_DIR="$AUTOPKGTEST_TMP"
 
+tests=$(gnome-desktop-testing-runner -l gtk-4.0 |
+    cut -f1 -d' ' |
+    grep -v '^gtk-4.0/a11y/tree.test$' |
+    grep -v '^gtk-4.0/a11y/tree.test$' |
+    grep -v '^gtk-4.0/gtk/displayclose.test$' |
+    grep -v '^gtk-4.0/gtk/icontheme.test$')
+
 exec dbus-run-session -- \
 xvfb-run -a -s "-screen 0 1024x768x24" \
 debian/run-with-locales \
@@ -22,4 +29,4 @@ debian/run-with-locales \
 gnome-desktop-testing-runner \
 --report-directory="$AUTOPKGTEST_ARTIFACTS" \
 --tap \
-gtk-4.0
+$tests
diff --git a/debian/tests/installed-tests-flaky b/debian/tests/installed-tests-flaky
new file mode 100755 (executable)
index 0000000..0379cdf
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+# autopkgtest check: Run the installed-tests to verify GTK works correctly
+# Based on glib2.0's d/tests/installed-tests, (C) 2013 Canonical Ltd.
+
+set -e
+
+# Disable gvfs if it happens to be installed. We want to test the built-in
+# stuff
+export GIO_USE_VFS=local
+export GIO_USE_VOLUME_MONITOR=unix
+
+export XDG_RUNTIME_DIR="$AUTOPKGTEST_TMP"
+
+exec dbus-run-session -- \
+xvfb-run -a -s "-screen 0 1024x768x24" \
+debian/run-with-locales \
+    --generate de_DE.UTF-8 \
+    --generate en_GB.UTF-8 \
+    --generate en_US.UTF-8 \
+    --generate sv_SE \
+    -- \
+xvfb-run -a -s "-screen 0 1024x768x24" \
+gnome-desktop-testing-runner \
+--report-directory="$AUTOPKGTEST_ARTIFACTS" \
+--tap \
+gtk-4.0/a11y/tree.test \
+gtk-4.0/a11y/tests.test \
+gtk-4.0/gtk/displayclose.test \
+gtk-4.0/gtk/icontheme.test